#include "stdafx.h"
#include "ckDataSourceManagerFactory.h"
#include "ckDataSourceManagerAccess.h"
#include "ckDataSourceManagerMySQL.h"

namespace ck
{
	DataSourceManagerFactory::DataSourceManagerFactory()
	{
	}


	DataSourceManagerFactory::~DataSourceManagerFactory()
	{
	}

	DataSourceManagerFactory* DataSourceManagerFactory::GetInstance()
	{
		static DataSourceManagerFactory g_checkModelFactory;
		return &g_checkModelFactory;
	}

	DataSourceManager* DataSourceManagerFactory::GetDataSourceManager(ckDbType type)
	{
		DataSourceManager* pManager = NULL;
		switch (type)
		{
		case ckDbAccess:
		{
			static DataSourceManagerAccess g_checkModelAccess;
			DataSourceManager::m_pInstance = &g_checkModelAccess;

		}
		break;
		case ckDbMySQL:
		{
			static DataSourceManagerMySQL g_checkModelMySQL;
			DataSourceManager::m_pInstance = &g_checkModelMySQL;
		}
		break;
		case ckDbOracle:
			break;
		}

		return DataSourceManager::GetInstance();
	}

}
